﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BLL;
using Entity;
namespace BookStore.Controllers
{
    public class IntroductionController : Controller
    {
        //
        // GET: /Introduction/
        //商品详情
        public ActionResult introduction()
        
        {
            return View();
        }
        //根据图书ID获取图书信息
        public ActionResult Z_BookID(int Z_BookID)
        {
            List<BookInformatica> list = BLL.Z_Book.GetDetail(Z_BookID);
           
            ViewBag.name = list[0].BookName;
            ViewBag.price = list[0].BookPrice;
            ViewBag.BookPress = list[0].BookPress;
            ViewBag.BookPicture = list[0].BookPicture;
            ViewBag.BookDescribe = list[0].BookDescribe;
            ViewBag.BookNumber = list[0].BookNumber;
            ViewBag.TypeName = list[0].TypeName;
            ViewBag.BookPoster = list[0].BookPoster;
            ViewBag.BookAuthor = list[0].BookAuthor;
            ViewBag.BookTime = list[0].BookTime;
            ViewBag.id = Z_BookID;

            //根据图书ID显示图书评论
            List<Comment> clist = BLL.Z_Book.Getcomment(Z_BookID);
            ViewBag.cm = clist;
            //ViewBag.CommentId = clist[0].CommentId;
            //ViewBag.CommentState = clist[0].CommentState;
            //ViewBag.CommentValue = clist[0].CommentValue;
            //ViewBag.UserId = clist[0].UserId;
            //ViewBag.CommentDate = clist[0].CommentDate;
            ViewBag.id = Z_BookID;
            return View("introduction");
        }
        //根据图书ID显示图书评论
       
    }
}
